package com.example.demo.conf;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * @author 刘二朋
 * @date 2020-12-03 16:58
 */
@Configuration
public class WebSocketConfig {

    /**
     * 功能类 , 增加WebSocket的支持
     *
     * @return 返回一个ServerEndpointExporter对象
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }
}
